<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>27日 (_key_定位 渐变色) | 学习笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="xylim">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-sectionx/sectionx.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../2018/September/30.html" />
    
    
    <link rel="prev" href="../../2018/September/26.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="1.7"
        data-chapter-title="27日 (_key_定位 渐变色)"
        data-filepath="2018/September/27.md"
        data-basepath="../.."
        data-revision="Wed Oct 10 2018 10:28:01 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="2018/September/九月份September.html">
            
                
                    <a href="../../2018/September/九月份September.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        九月份 September
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="2018/September/18.html">
            
                
                    <a href="../../2018/September/18.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        18日 (_key_html标签入门介绍)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="2018/September/19.html">
            
                
                    <a href="../../2018/September/19.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        19日 (_key_git提交 markdown语法)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="2018/September/20.html">
            
                
                    <a href="../../2018/September/20.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        20日 (_key_多媒体 ifram)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="2018/September/21.html">
            
                
                    <a href="../../2018/September/21.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        21日 (_key_盒子模型 css选择器)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="2018/September/25.html">
            
                
                    <a href="../../2018/September/25.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        25日 (_key_字体 icon 边框画圆、三角 伪元素选择器 行高 垂直对齐)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="2018/September/26.html">
            
                
                    <a href="../../2018/September/26.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        26日 (_key_浮动 文本处理 行内块空隙处理)
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.7" data-path="2018/September/27.html">
            
                
                    <a href="../../2018/September/27.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        27日 (_key_定位 渐变色)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="2018/September/30.html">
            
                
                    <a href="../../2018/September/30.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        30日 (_key_过渡transition 转换transform 开关demo)
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="2018/October/十月份October.html">
            
            <span><b>2.</b> 十月份 October</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="2018/October/8.html">
            
                
                    <a href="../../2018/October/8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        8日 (_key_动画 sass)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="2018/October/9.html">
            
                
                    <a href="../../2018/October/9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        9日 (_key_滤镜 git版本回退)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="2018/October/10.html">
            
                
                    <a href="../../2018/October/10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        10日 (_key_XXX)
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >学习笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <html><head></head><body><h1 id="xx&#x65E5;">XX&#x65E5;</h1>
<p><br></p>
<h4 id="&#x91CD;&#x70B9;&#x77E5;&#x8BC6;">&#x91CD;&#x70B9;&#x77E5;&#x8BC6;</h4>
<h6 id="&#x76F8;&#x5173;&#x77E5;&#x8BC6;&#xFF1A;&#x5B9A;&#x4F4D;-&#x6E10;&#x53D8;&#x8272;">&#x76F8;&#x5173;&#x77E5;&#x8BC6;&#xFF1A;&#x5B9A;&#x4F4D; &#x6E10;&#x53D8;&#x8272;</h6>
<p><br></p>
<ul>
<li>&#x6682;&#x65F6;&#x6CA1;&#x6709; <a href="30.html">&#x4E0B;&#x4E00;&#x7BC7;</a></li>
</ul>
<sec data-title="&#x5B9A;&#x4F4D; &#xFF08;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D; &#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D; fixed&#xFF09;" data-id="section0" data-show="true"><div class="panel panel-default"><div class="panel-heading"><h2>&#x5B9A;&#x4F4D; &#xFF08;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D; &#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D; fixed&#xFF09;<a class="pull-right section atTitle btn btn-default" target="section0"><span class="fa fa-angle-up"></span></a></h2></div><div class="panel-collapse in" id="section0"><div class="panel-body">
<pre><code>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;utf-8&quot; /&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../publicProject/css/public.css&quot;/&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            body{
                margin: auto;
                width: 1000px;
                height: 1000px;
                border: 1px solid deeppink;
            }
            .boxA{
                width: 100px;
                height: 100px;
                background-color: skyblue;
                position: absolute;
                left: 20px;
            }
            .boxA2{
                width: 100px;
                height: 100px;
                background-color: green;
                position: absolute;
                left: 40px;
            }
            .boxR{
                width: 200px;
                height: 200px;
                background-color: deeppink;
                position: relative;
                top: 40px;
                left: 20px;
            }
            .boxF{
                width: 100%;
                height: 50px;
                font-size: 30px;
                background:rgba(0,0,0,0.3);
                bottom: 0px;
                position: fixed;
            }
            .boxRC{
                position: relative;
                width: 300px;
                height: 300px;

                margin-left: calc(100% /2 - 150px);
                margin-top: calc(100% /2 - 150px);
                background-color: gray;
            }
        &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;

        &lt;!--
            1.    &#x5F53;&#x5B9A;&#x4F4D;&#x7684;&#x5143;&#x7D20;&#x6CA1;&#x6709;&#x8BBE;&#x7F6E;&#x5BBD;&#x9AD8;&#x65F6; top&#x548C;bottom left&#x548C;right 
                &#x540C;&#x65F6;&#x8BBE;&#x7F6E;&#x65F6;&#x53EF;&#x4EE5;&#x62C9;&#x4F38;&#x5143;&#x7D20;&#x7684;&#x5BBD; &#x5143;&#x7D20;&#x7684;&#x5C3A;&#x5BF8;
            2.    &#x5B9A;&#x4F4D;&#x662F;&#x5B8C;&#x5168;&#x8131;&#x79BB;&#x6B63;&#x5E38;&#x6587;&#x6863;&#x6D41;&#xFF08;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D;&#x4E0D;&#x8BBE;&#x7F6E;&#x65B9;&#x4F4D;&#x503C;&#x662F;&#x5360;&#x636E;&#xFF09;
            3.    &#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#x9ED8;&#x8BA4;body&#x4E3A;&#x5B9A;&#x4F4D;&#x7684;&#x53C2;&#x8003;&#xFF0C;&#x82E5;&#x6700;&#x8FD1;&#x7684;&#x4E0A;&#x7EA7;&#x5143;&#x7D20;&#x6709;position:relative,&#x5C31;&#x53C2;&#x8003;
                &#x6B64;&#x5143;&#x7D20; &#x4EE5;&#x6B64;&#x7C7B;&#x63A8;
            4.    &#x56FA;&#x5B9A;&#x5B9A;&#x4F4D;position:fixed &#x76F8;&#x5BF9;&#x7A97;&#x53E3;&#x4F4D;&#x7F6E;&#x5B9A;&#x4F4D;
            5.    z-index&#x662F;&#x53EF;&#x4EE5;&#x8BBE;&#x7F6E;&#x5B9A;&#x4F4D;&#x5143;&#x7D20;&#x7684;&#x5C42;&#x7EA7;&#xFF0C;&#x6570;&#x503C;&#x8D8A;&#x5927;&#x8D8A;&#x9760;&#x4E0A;&#x5C42;
                &#x5982;&#x679C;&#x540C;&#x5C42; z-index&#x6570;&#x503C;&#x4E00;&#x81F4; html &#x540E;&#x6765;&#x5C45;&#x4E0A;
            6.    &#x5C45;&#x4E2D;&#x65F6; top &#x548C; left &#x4E3A;50% &#x518D;&#x8BBE;&#x7F6E;margin-top&#x548C;margin-left
                &#x4E3A;&#x8D1F;&#x7684;&#x5BBD;&#x9AD8;&#x4E00;&#x534A;

        --&gt;
        &lt;!--
        &lt;div class=&quot;boxR&quot;&gt;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D;relative
        &lt;div class=&quot;boxA&quot;&gt;1&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;absoult&lt;/div&gt;
        &lt;div class=&quot;boxA2&quot;&gt;2&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;absoult&lt;/div&gt;
        &lt;/div&gt;
        &lt;p class=&quot;p1&quot;&gt;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&#x6587;&#x5B57;&lt;/p&gt;

        &lt;div class=&quot;boxF&quot;&gt;&#x56FA;&#x5B9A;&#x5B9A;&#x4F4D;&lt;/div&gt;--&gt;
        &lt;div class=&quot;boxRC&quot;&gt;&#x76F8;&#x5BF9;&#x5B9A;&#x4F4D;relative&#x5C45;&#x4E2D;&lt;/div&gt;

    &lt;/body&gt;
&lt;/html&gt;
</code></pre></div></div></div></sec>
<sec data-title="&#x6E10;&#x53D8;&#x8272;" data-id="section1" data-show="true"><div class="panel panel-default"><div class="panel-heading"><h2>&#x6E10;&#x53D8;&#x8272;<a class="pull-right section atTitle btn btn-default" target="section1"><span class="fa fa-angle-up"></span></a></h2></div><div class="panel-collapse in" id="section1"><div class="panel-body">
<pre><code>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;style type=&quot;text/css&quot;&gt;

            /*    linear-gradient
                 &#x89D2;&#x5EA6;
                     to top         &#xFF1A;0deg &#x4ECE;&#x4E0B;&#x81F3;&#x4E0A; &#x9ED8;&#x8BA4;&#x503C;
                     to right     &#xFF1A;90deg    &#x4ECE;&#x5DE6;&#x81F3;&#x53F3;
                     to left     &#xFF1A;270deg    &#x4ECE;&#x53F3;&#x81F3;&#x5DE6;
                     to bottom     &#xFF1A;180deg    &#x4ECE;&#x4E0A;&#x81F3;&#x4E0B;

                     */

            .box{
                width: 200px;
                height: 100px;
                background:linear-gradient(to bottom,#fff,#000);
            }



        &lt;/style&gt;

    &lt;/head&gt;
    &lt;body&gt;

        &lt;div class=&quot;box&quot;&gt;

        &lt;/div&gt;



    &lt;/body&gt;
&lt;/html&gt;
</code></pre></div></div></div></sec></body></html>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../2018/September/26.html" class="navigation navigation-prev " aria-label="Previous page: 26日 (_key_浮动 文本处理 行内块空隙处理)"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../2018/September/30.html" class="navigation navigation-next " aria-label="Next page: 30日 (_key_过渡transition 转换transform 开关demo)"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
    

    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sectionx/sectionx.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-interactive":{},"sectionx":{},"splitter":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
